﻿
bingo.module('system', function () {

    bingo.service('userService', function () {
        return {
            add: function (item) {
                var data = "";
                $.ajax({
                    type : "GET",
                    url : "other.json",
                    async: false,
                    data : item,
                    dataType : "json",
                    success : function(res) {
                        data = res;
                    },
                    error : function (res) {
                        data = res;
                    }
                });
                return data;
            },
            update: function (item) {
                var data = "";
                $.ajax({
                    type : "GET",
                    url : "other.json",
                    async: false,
                    data : item,
                    dataType : "json",
                    success : function(res) {
                        data = res;
                    },
                    error : function (res) {
                        data = res;
                    }
                });
                return data;
            },
            delete: function (items) {
                var data = "";
                $.ajax({
                    type : "GET",
                    url : "other.json",
                    async: false,
                    data : items,
                    dataType : "json",
                    success : function(res) {
                        data = res;
                    },
                    error : function (res) {
                        data = res;
                    }
                });
                return data;
            }
        };
    });

});
